import { reactive, ref } from "vue";

export default function InitHook() {
  const searchForm = reactive<Partial<MyApproval.SearchForm>>({
    waybillNumList: "",
    problemPieceTypeList: [],
    customerIdList: [],
    stateList: [],
    createByList: [],
    time: [],
    pageNum: 1,
    pageSize: 100,
    total: 0
  });
  const tableData = ref<Array<MyApproval.ListRows>>([]);
  const activeKey = ref<string>("1");

  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });
  return {
    searchForm,
    tableData,
    dialogOpts,

    activeKey,
    drawerOpts
  };
}
